<form class="layui-form layui-form-pane" action="" style="padding:15px 15px 0 15px">
  <div class="layui-tab">
    <ul class="layui-tab-title">
      <li class="layui-this">{$item['ordersn']}<span class="label label-success">(采购)</span></li>
      {loop $salereturn $row}
      <li>{$row['ordersn']}<span class="label label-danger">(退货)</span></li>
      {/loop}
    </ul>
    <div class="layui-tab-content">
      <div class="layui-tab-item layui-show">
        <div style="height:340px; overflow-y:scroll; padding:10px 0">
          <table class="layui-table">
            <thead>
              <tr>
                <th>条形码</th>
                <th>名称</th>
                <th>单位</th>
                <th>数量</th>
                <th>单价</th>
                <th>合计</th>
                <th>实付</th>
              </tr>
            </thead>
            <tbody>
              {loop $goodlist $row}
              <tr>
                <td>{php echo $goodary[$row['goodid']]['goodsn']}</td>
                <td>{php echo $goodary[$row['goodid']]['title']}</td>
                <td>{php echo $goodary[$row['goodid']]['unitname']}</td>
                <td>{$row['num']}</td>
                <td>{$row['price']}</td>
                <td>{$row['totalfee']}</td>
                <td>{$row['paidfee']}</td>
                {/loop}
              </tr>
            </tbody>
          </table>
        </div>
        <div class="row" style="border-top:1px solid #CCC; padding-top:10px; margin-bottom:15px">
          <div class="col-md-6 text-center">总金额：<span id="totalfee">￥{$item['totalfee']}</span></div>
          <div class="col-md-4">实付：<span class="pricecss">￥{$item['paidfee']}</span></div>
        </div>
        <div class="row" style="border-bottom:1px solid #CCC; padding-bottom:10px; margin-bottom:15px">
          <div class="col-md-4">备注：<span>{$item['remark']}</span>
            
          </div>
          <div class="col-md-4">其他费用：<span>￥{$item['otherfee']}</span></div>
          <div class="col-md-4 form-inline">结账方式：
          {if $item['paytype']==0}微信
          {elseif $item['paytype']==1}支付宝
          {elseif $item['paytype']==2}现金
          {elseif $item['paytype']==3}银行卡
          {elseif $item['paytype']==5}其他
          {/if}
          </div>
        </div>
      </div>
      {loop $salereturn $rew}
      <div class="layui-tab-item">
      	<div style="height:340px; overflow-y:scroll; padding:10px 0">
          <table class="layui-table">
            <thead>
              <tr>
                <th>条形码</th>
                <th>名称</th>
                <th>单位</th>
                <th>数量</th>
                <th>单价</th>
                <th>合计</th>
                <th>实付</th>
              </tr>
            </thead>
            <tbody>
              {loop $salegoodary[$rew['outordersn']] $row}
              <tr>
                <td>{php echo $goodary[$row['goodid']]['goodsn']}</td>
                <td>{php echo $goodary[$row['goodid']]['title']}</td>
                <td>{php echo $goodary[$row['goodid']]['unitname']}</td>
                <td>{$row['num']}</td>
                <td>{$row['price']}</td>
                <td>{$row['totalfee']}</td>
                <td>{$row['paidfee']}</td>
                {/loop}
              </tr>
            </tbody>
          </table>
        </div>
        <div class="row" style="border-top:1px solid #CCC; padding-top:10px; margin-bottom:15px">
          <div class="col-md-6 text-center">总金额：<span id="totalfee">￥{$rew['totalfee']}</span></div>
          <div class="col-md-4">实付：<span class="pricecss">￥{$rew['paidfee']}</span></div>
        </div>
        <div class="row" style="border-bottom:1px solid #CCC; padding-bottom:10px; margin-bottom:15px">
          <div class="col-md-4">备注：<span>{$rew['remark']}</span>
            
          </div>
          <div class="col-md-4">其他费用：<span>￥{$rew['otherfee']}</span></div>
          <div class="col-md-4 form-inline">结账方式：
          {if $rew['paytype']==0}微信
          {elseif $rew['paytype']==1}支付宝
          {elseif $rew['paytype']==2}现金
          {elseif $rew['paytype']==3}银行卡
          {elseif $rew['paytype']==5}其他
          {/if}
          </div>
        </div>
      </div>
      {/loop} 
    </div>
  </div>
  
</form>
